package org.kongqian.orgs.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.kongqian.basic.domain.BaseDomain;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class Department extends BaseDomain {
    private Long id;

    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "部门介绍")
    private String intro;

    @ApiModelProperty(value = "部门创建时间")
    private Date create_time;

    @ApiModelProperty(value = "部门修改时间")
    private Date update_time;

    @ApiModelProperty(value = "部门领导")
    private Employee head;

    @ApiModelProperty(value = "父级部门")
    private Department parent;

    @ApiModelProperty(value = "部门路径")
    private String path;

    @ApiModelProperty(value = "状态")
    private Integer state;

    @ApiModelProperty(value = "状态")
    private List<Department> children;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT + 8" )
    public Date getCreate_time() {
        return create_time;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT + 8" )
    public Date getUpdate_time() {
        return update_time;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }
}
